﻿using Framework.Core.Eto;
using Framework.Core.Helper;
using Microsoft.Extensions.Logging;
using my.abp.Domain.Shared.Etos;
using Quartz.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
using Volo.Abp.EventBus;

namespace my.abp.Domain.EventHandlers
{
	/// <summary>
	/// Web API 接口操作日志事件
	/// </summary>
	public class OperLogEventHandler : ILocalEventHandler<OperationLog>,
		 ITransientDependency
	{
		private readonly ILogger<LoginEventHandler> _logger;

		public OperLogEventHandler(ILogger<LoginEventHandler> logger) { _logger = logger; }
		public async Task HandleEventAsync(OperationLog eventData)
		{
			_logger.LogDebug("操作日志:" + JsonHelper.ObjToStr(eventData, "yyyy-MM-dd HH:mm:ss"));
		}
	}
}
